<div class="body">
    
    <table mat-table [dataSource]="dataSource" class="mat-elevation-z8"> 
      
        <!-- Name Column -->
        <ng-container matColumnDef="name">
          <th mat-header-cell *matHeaderCellDef> 名称 </th>
          <td mat-cell *matCellDef="let element"> {{element.name}} </td>
        </ng-container>

            <!-- Position Column -->
        <ng-container matColumnDef="type">
          <th mat-header-cell *matHeaderCellDef> 类型 </th>
          <td mat-cell *matCellDef="let info"> {{info?.isSymbolicLink==true?'符号链接':(info?.isDir==true?'目录':'文件')}}</td>
        </ng-container>
      
        <!-- Weight Column -->
        <ng-container matColumnDef="modTime">
          <th mat-header-cell *matHeaderCellDef> 修改时间 </th>
          <td mat-cell *matCellDef="let info"> {{info?.modTime | date:'yyyy-MM-dd HH:mm:ss'}} </td>
        </ng-container>
      
        <!-- Symbol Column -->
        <ng-container matColumnDef="size">
          <th mat-header-cell *matHeaderCellDef> 大小 </th>
          <td mat-cell *matCellDef="let element"> {{formatFileSize(element.size)}} </td>
        </ng-container>
      
        <tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
        <tr mat-row  [ngClass]="{ 'selected': itemSelected(row)}" class="data_item"   *matRowDef="let row; columns: displayedColumns;" [cdkContextMenuTriggerFor]="item_menu"  (cdkContextMenuOpened)="itemMeneOpen(row)" [cdkContextMenuTriggerData]="{$implicit: row}" (dblclick)="open(row)" (click)="clickItem($event,row)" ></tr>
      </table> 
</div>

<ng-template #item_menu let-data>
      <div class="menu" cdkMenu  *ngIf="isMutiSelectMenue(data)"  >
      <button class="menu-item"  cdkMenuItem (click)="multi_copy()" >复制</button>
      <button class="menu-item"  cdkMenuItem (click)="multi_shear()" >剪切</button>
      <button class="menu-item"  cdkMenuItem  (click)="multi_remove()" >删除</button> 
    </div>
  <div class="menu" cdkMenu *ngIf="!isMutiSelectMenue(data)"  > 
    <button class="menu-item"  cdkMenuItem *ngIf="isOpen(data)" (click)="open(data)">打开</button> 
    <button class="menu-item"  cdkMenuItem  *ngFor="let item of ext_operations_current" (click)="ext_operation_execute(item,data)" >{{item.name}}</button>
     
    <button class="menu-item"  cdkMenuItem (click)="copy(data)" >复制</button>
    <button class="menu-item"  cdkMenuItem (click)="shear(data)" >剪切</button>
    <button class="menu-item"  cdkMenuItem (click)="rename(data)" >重命名</button>
    <button class="menu-item"  cdkMenuItem (click)="remove(data)" >删除</button>   
    <button class="menu-item" cdkMenuItem (click)="properties(data)">属性</button>   
  </div>
</ng-template>
